package com.gtfrank.web.servlet.day1;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @ProjectName: sudacoursetrainging
 * @ClassName: ThreeServlet
 * @PackageName:com.gtfrank.web.servlet.day1
 * @Description: 继承HttpServlet
 * @Author: frank
 * @Date: 2021/4/23 14:08
 * @Version v1.0
 */
@WebServlet(name = "ThreeServlet",urlPatterns = {"/day1/threeServlet"})
public class ThreeServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("do post");
    }


    @Override
    public void destroy() {
        System.out.println("ThreeServlet destory");
    }

    @Override
    public void init() throws ServletException {
        System.out.println("ThreeServlet init");
    }
}
